﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IRM.Messaging
{
    internal class FailedMessageException : Exception
    {
        protected FailedMessageException(int messageId) : base()
        {
            this.MessageId = messageId;
        }

        public FailedMessageException(int messageId, Exception innerException) : base(innerException.Message, innerException)
        {
            this.MessageId = messageId;
        }

        public int MessageId { get; set; }

        public override string ToString()
        {
            string to = base.ToString();
            to += "/nMessageId=" + MessageId.ToString();
            return to;
        }
    }
}
